<template>
  <!-- 清算账户自动拆借管理结果查询明细页面弹出框-->
  <el-dialog
    title="清算账户自动拆借管理结果查询明细"
    center
    :visible.sync="open"
    width="1024px"
    :close-on-click-modal="false"
    @close="closeFn"
  >
    <el-form ref="detailsForm" :model="formData" label-width="150px">
      <el-card class="form-card txnInfo-card">
        <div slot="header" class="label-header-msg">
          <span>请求信息详情</span>
        </div>
        <el-row>
          <el-col :span="24">
            <el-form-item label="交易流水号：" prop="id">
              <el-input v-model="formData.id" placeholder="交易流水号" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="报文标识号：" prop="pkgId">
              <el-input v-model="formData.pkgId" placeholder="报文标识号" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="CPG日期：" prop="vdate">
              <el-date-picker
                disabled
                v-model="formData.vdate"
                type="date"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="工作日期：" prop="workDate">
              <el-date-picker
                disabled
                v-model="formData.workDate"
                type="date"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="来往账标志：" prop="drct">
              <el-select v-model="formData.drct" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  v-for="dict in dictMap.DRCTCODE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="拆入行行号：" prop="cStBrno">
              <el-input v-model="formData.cStBrno" placeholder="拆入行行号" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="拆入行行名：" prop="cStBrname">
              <el-input v-model="formData.cStBrname" placeholder="拆入行行名" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="拆出行行号：" prop="dStBrno">
              <el-input v-model="formData.dStBrno" placeholder="拆出行行号" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="拆出行行名：" prop="dStBrname">
              <el-input v-model="formData.dStBrname" placeholder="拆出行行名" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="拆借协议号：" prop="protoNum">
              <el-input v-model="formData.protoNum" placeholder="拆借协议号" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="自动拆借管理类型：" prop="cdMngType">
              <el-select v-model="formData.cdMngType" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  v-for="dict in dictMap.CD_MNG_TYPE"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="货币币种：" prop="curcd">
              <el-input v-model="formData.curcd" placeholder="货币币种" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="拆借金额下限：" prop="amtLowerLmt">
              <el-input v-model="formData.amtLowerLmt" placeholder="拆借金额下限" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="拆借金额上限：" prop="amtUpperLmt">
              <el-input v-model="formData.amtUpperLmt" placeholder="拆借金额上限" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="恢复金额：" prop="amount">
              <el-input v-model="formData.amount" placeholder="恢复金额" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="报文发送时间：" prop="sndTime">
              <el-date-picker
                disabled
                v-model="formData.sndTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报文接收时间：" prop="rcvTime">
              <el-date-picker
                disabled
                v-model="formData.rcvTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="备注：" prop="remarks">
              <el-input type="textarea" v-model="formData.remarks" placeholder="备注" show-word-limit disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="录入操作员：" prop="mdTlrno">
              <el-input v-model="formData.mdTlrno" placeholder="录入操作员" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录入时间：" prop="mdTime">
              <el-date-picker
                disabled
                v-model="formData.mdTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="审核操作员：" prop="audTlrno">
              <el-input v-model="formData.audTlrno" placeholder="审核操作员" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审核时间：" prop="audTime">
              <el-date-picker
                disabled
                v-model="formData.audTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="审核附言：" prop="audRemarks">
              <el-input type="textarea" v-model="formData.audRemarks" placeholder="审核附言" disabled show-word-limit />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="通讯状态：" prop="status">
              <el-select v-model="formData.status" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  v-for="dict in dictMap.PKG_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="业务状态：" prop="txnStatus">
              <el-select v-model="formData.txnStatus" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  v-for="dict in dictMap.TXN_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="申请中心状态：" prop="procStatus">
              <el-select v-model="formData.procStatus" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  v-for="dict in dictMap.PROCESSSTATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
              <el-form-item label="通用报文处理码" prop="proCode">
                <el-select style="width: 100%;"
                           v-model="formData.proCode===null||formData.proCode===undefined?'':formData.proCode+'-'+formData.proCodeDesc"
                           placeholder="通用报文处理码" :disabled="true"
                >

                </el-select>
              </el-form-item>
            </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="业务处理信息：" prop="oriRejectInfo">
              <el-input
                type="textarea"
                v-model="formData.oriRejectInfo"
                placeholder="业务处理信息"
                disabled
                show-word-limit
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>
    </el-form>
    <el-form ref="detailsForm375" :model="formData375" label-width="150px">
      <el-card class="form-card txnInfo-card" v-if="formData375.id">
        <div slot="header" class="label-header-msg">
          <span>应答信息详情</span>
        </div>
        <el-row>
          <el-col :span="24">
            <el-form-item label="交易流水号：" prop="id">
              <el-input v-model="formData375.id" placeholder="交易流水号" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="报文标识号：" prop="pkgId">
              <el-input v-model="formData375.pkgId" placeholder="报文标识号" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="CPG日期：" prop="vdate">
              <el-date-picker
                disabled
                v-model="formData375.vdate"
                type="date"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="工作日期：" prop="workDate">
              <el-date-picker
                disabled
                v-model="formData375.workDate"
                type="date"
                value-format="yyyyMMdd"
                placeholder="选择日期"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="原发起参与机构：" prop="oriSender">
              <el-input v-model="formData375.oriSender" placeholder="原发起参与机构" disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="报文发送时间：" prop="sndTime">
              <el-date-picker
                disabled
                v-model="formData375.sndTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="报文接收时间：" prop="rcvTime">
              <el-date-picker
                disabled
                v-model="formData375.rcvTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="备注：" prop="remarks">
              <el-input type="textarea" v-model="formData375.remarks" placeholder="备注" show-word-limit disabled />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="录入操作员：" prop="mdTlrno">
              <el-input v-model="formData375.mdTlrno" placeholder="录入操作员" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="录入时间：" prop="mdTime">
              <el-date-picker
                disabled
                v-model="formData375.mdTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>

        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="审核操作员：" prop="audTlrno">
              <el-input v-model="formData375.audTlrno" placeholder="审核操作员" disabled />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="审核时间：" prop="audTime">
              <el-date-picker
                disabled
                v-model="formData375.audTime"
                type="datetime"
                value-format="yyyyMMddHHmmss"
                placeholder="选择时间"
                style="width: 100%"
              ></el-date-picker>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="审核附言：" prop="audRemarks">
              <el-input
                type="textarea"
                v-model="formData375.audRemarks"
                placeholder="审核附言"
                show-word-limit
                disabled
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="业务回执状态：" prop="bizStatus">
              <el-select v-model="formData375.bizStatus" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  v-for="dict in dictMap.PROCESSSTATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="通讯状态：" prop="status">
              <el-select v-model="formData375.status" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  v-for="dict in dictMap.PKG_STATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="12">
            <el-form-item label="业务拒绝处理码：" prop="bizRejectCode">
              <el-select v-model="formData375.bizRejectCode" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  :label="`${formData375.bizRejectCode ? formData375.bizRejectCode : ''}${formData375.bizRejectCodeDesc ? '-' + formData375.bizRejectCodeDesc : ''}`"
                  :value="formData375.bizRejectCode"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="业务拒绝信息：" prop="bizRejectInfo">
              <el-input
                type="textarea"
                v-model="formData375.bizRejectInfo"
                placeholder="业务拒绝信息"
                show-word-limit
                disabled
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row type="flex">
          <el-col :span="12">
            <el-form-item label="通用报文处理码：" prop="procCode">
              <el-select v-model="formData375.procCode" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  :label="`${formData375.procCode ? formData375.procCode : ''}${formData375.procCodeDesc ? '-' + formData375.procCodeDesc : ''}`"
                  :value="formData375.procCode"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="NPC处理状态：" prop="procStatus">
              <el-select v-model="formData375.procStatus" placeholder="请选择" style="width: 100%" disabled>
                <el-option
                  v-for="dict in dictMap.PROCESSSTATUS"
                  :key="dict.value"
                  :label="`${dict.value}-${dict.text}`"
                  :value="dict.value"
                ></el-option>
              </el-select>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="业务处理信息：" prop="rejectInfo">
              <el-input
                type="textarea"
                v-model="formData375.rejectInfo"
                placeholder="业务处理信息"
                show-word-limit
                disabled
              />
            </el-form-item>
          </el-col>
        </el-row>
      </el-card>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button @click="closeFn">关闭</el-button>
    </div>
  </el-dialog>
</template>
<script>
export default {
  name: "QueryDetails",
  components: {},
  props: {
    dictMap: {
      type: Object,
      default: () => {
        return {};
      },
    },
    formData: {
      type: Object,
      default: () => {
        return {};
      },
    },
    formData375: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  data() {
    return {
      // 是否显示弹出层
      open: false,
    };
  },
  mounted() {},
  methods: {
    // 表单重置
    reset() {
      this.resetForm("detailsForm");
      this.resetForm("detailsForm375");
      // this.$set(this, "form", {});
    },
    closeFn() {
      this.open = false;
      this.reset();
    },
    show() {
      this.open = true;
    },
  },
};
</script>
<style>
.label-header-msg {
  font-weight: bold;
}

.form-card {
  margin-bottom: 10px;
}
</style>
